home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!usenet
- From: GHouck <hksys@teleport.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Small question
- Date: 8 Apr 1996 04:45:40 GMT
- Organization: systems hk
- Message-ID: <4ka5lk$dln@nadine.teleport.com>
- References: <31674eeb.132847918@vixa.voyager.net>
- NNTP-Posting-Host: ip-pdx21-13.teleport.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- sence@ava.taby.se (Bjorn Osterman) wrote:
- >If I have 2 cpp files and i use the same global variable that i define
- >in some file that both cpp-files includes. How do I tell the compiler
- >that the variable is the same and that it shouldn't make space 2
- >times?
-
- Try declaring it as 'extern' in the including files.
- Yours, Geoff Houck
-
-